package com.taotao.sys.entity;

import com.alibaba.fastjson.JSON;
import lombok.Data;

import io.swagger.annotations.ApiModelProperty;
import com.gitee.fastmybatis.annotation.Column;

import com.gitee.fastmybatis.annotation.Pk;
import com.gitee.fastmybatis.annotation.PkStrategy;
import com.gitee.fastmybatis.annotation.Table;
import com.gitee.fastmybatis.annotation.LogicDeleteStrategy;


import java.time.LocalDateTime;

import java.io.Serializable;

/**
* 账号表
* @author Fan Beibei
* @date   2025-05-18 23:03:08
*/
@Data
@Table(name = "sys_user",pk = @Pk(name = "id", strategy = PkStrategy.NONE))
public class SysUser implements Serializable {


	@ApiModelProperty(value="")
	private Long id;

	@ApiModelProperty(value="账号")
	private String username;

	@ApiModelProperty(value="密码")
	private String password;

	@ApiModelProperty(value="显示名称")
	private String nickName;

	@ApiModelProperty(value="手机号")
	private String mobile;

	@ApiModelProperty(value="邮箱")
	private String email;

	@ApiModelProperty(value="账号类型(root-系统超级管理员,admin-系统管理员,normal-普通账号)")
	private String type;

	@ApiModelProperty(value="状态：1-启用；0-禁用")
	private Integer status;

	@ApiModelProperty(value="是否删除:0-否，非0-是")
	@Column(logicDelete = true,  notDeleteValue = "0",logicDeleteStrategy = LogicDeleteStrategy.ID_FILL)
	private Long deleted;

	@ApiModelProperty(value="创建人")
	private Long createId;

	@ApiModelProperty(value="创建时间")
	private LocalDateTime createAt;

	@ApiModelProperty(value="更新人")
	private Long updateId;

	@ApiModelProperty(value="更新时间")
	private LocalDateTime updateAt;


	// 列名常量
	public static final String ID = "id";
	public static final String USERNAME = "username";
	public static final String PASSWORD = "password";
	public static final String NICK_NAME = "nick_name";
	public static final String MOBILE = "mobile";
	public static final String EMAIL = "email";
	public static final String TYPE = "type";
	public static final String STATUS = "status";
	public static final String DELETED = "deleted";
	public static final String CREATE_ID = "create_id";
	public static final String CREATE_AT = "create_at";
	public static final String UPDATE_ID = "update_id";
	public static final String UPDATE_AT = "update_at";


	@Override
	public String toString() {
		return JSON.toJSONString(this);
	}

}